<#include "include/head.ftl">
package ${NamespaceDao};

import com.qtone.aow.dao.BaseDao;
import ${NamespaceModel}.${Po};

<#include "include/copyright.ftl">

/**
 * @author ${copyright.author}
 */
@Service
public class ${Po}Server extends BaseServiceImpl {
    
    @Resource
	private ${Po}Dao dao;
	
	
	public Map<String, Object> getCompleteRecordList(${Po}View view) {
	
	       DetachedCriteria dc = DetachedCriteria.forClass(${Po}.class));
	
	       view.setCount(dao.queryCount(dc));
		   super.resetStart(view);
		   super.setOrder(dc, view);
		   List<${Po}> list = dao.queryPage(dc, view.getPage(), view.getRows());
		   
		   ArrayList<${Po}ed> rows = new ArrayList<${Po}ed>();
		   if(CollectionUtils.isNotEmpty(list)) {
		        
		        for (${Po} su : list) {
				    ${Po}ed v = new ${Po}ed();
				    BeanUtils.copyProperties(su, v);
				    
				    rows.add(v);
				}  
	
		   }
	      return super.setGridData(view.getCount(), rows);
	}
	
	
	
}